﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="MuaHang.aspx.cs" Inherits="MuaHang" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>Poker Chips</title>
    <link type="image5/x-icon" href="images/icon_facechip.png" rel="shortcut icon" />
    <link href="css/muahang.css" rel="stylesheet" type="text/css" />
    <link href="Admin/css/gridview.css" rel="stylesheet" type="text/css" />

    <script type="text/javascript">
        function UpdateParentsCart(val) {
            if (window.parent.SetShoppingCart != null)
                window.parent.SetShoppingCart(val);
        }
    </script>

</head>
<body>
    <form id="form1" runat="server">
    <asp:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server">
    </asp:ToolkitScriptManager>
    <table style="height: 100%" cellpadding="0" cellspacing="0" width="700" align="center"
        border="0">
        <tbody>
            <tr>
                <td>
                    &nbsp;
                </td>
                <td style="border-left: solid 1px #cecece; border-right: solid 1px #cecece;" valign="top"
                    width="680px" align="center" bgcolor="#FFFFFF">
                    <table width="600px" border="0">
                        <tbody>
                            <tr>
                                <td colspan="2">
                                    <table cellpadding="0" cellspacing="0" width="100%" border="0">
                                        <tbody>
                                            <tr>
                                                <td style="margin-left: 10px; height: 70px" valign="middle" nowrap="nowrap">
                                                    <h1>
                                                        BIỂU MẪU THANH TOÁN</h1>
                                                    <table cellpadding="0" cellspacing="0" align="left">
                                                        <tbody>
                                                            <tr>
                                                                <td class="sec-site-left-top">
                                                                </td>
                                                                <td class="sec-site-top">
                                                                </td>
                                                                <td class="sec-site-right-top">
                                                                </td>
                                                            </tr>
                                                            <tr>
                                                                <td class="sec-site-left">
                                                                </td>
                                                                <td align="left">
                                                                    <table class="sec-site-bg" cellpadding="0" cellspacing="0">
                                                                        <tbody>
                                                                            <tr valign="middle">
                                                                                <td width="2">
                                                                                </td>
                                                                                <td class="sec-site-lock" align="left">
                                                                                </td>
                                                                                <td width="5">
                                                                                </td>
                                                                                <td class="sec-site-lock-delim">
                                                                                </td>
                                                                                <td class="sec-site-content" align="left">
                                                                                    Thanh toán:<br>
                                                                                    <span class="secure_payment_website_for_name">
                                                                                        <asp:Label ID="lbchip" runat="server" Text="Label"></asp:Label>
                                                                                    </span>
                                                                                </td>
                                                                            </tr>
                                                                        </tbody>
                                                                    </table>
                                                                </td>
                                                                <td class="sec-site-right">
                                                                </td>
                                                            </tr>
                                                            <tr>
                                                                <td class="sec-site-left-bot">
                                                                </td>
                                                                <td class="sec-site-bot">
                                                                </td>
                                                                <td class="sec-site-right-bot">
                                                                </td>
                                                            </tr>
                                                        </tbody>
                                                    </table>
                                                </td>
                                                <td width="203px">
                                                    <a href="#" target="_blank">
                                                        <img src="images/logo-checkout.png" alt="Click2Sell" name="logo" title="Click2Sell"
                                                            height="115" width="203" border="0"></a>
                                                </td>
                                            </tr>
                                        </tbody>
                                    </table>
                                </td>
                            </tr>
                        </tbody>
                    </table>
                    <table id="loadingSpan" style="display: none" width="600px" border="0">
                        <tbody>
                            <tr>
                                <td height="100">
                                    &nbsp;
                                </td>
                            </tr>
                            <tr valign="top">
                                <td height="80%">
                                    <table width="500" align="center">
                                        <tbody>
                                            <tr>
                                                <td valign="top" align="center">
                                                    <span id="loadingLabel">Processing payment</span>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td valign="top" align="center">
                                                    <img src="images/ajax-loader.gif" height="15" vspace="10" width="128">
                                                </td>
                                            </tr>
                                        </tbody>
                                    </table>
                                </td>
                            </tr>
                        </tbody>
                    </table>
                    <table id="mainTbl" cellpadding="0" cellspacing="0" width="700">
                        <tbody>
                            <tr>
                                <td colspan="2">
                                    <input name="material" value="1" type="hidden">
                                    <input name="on_country_change" value="false" type="hidden">
                                    <table id="Table1" class="table buyer-info-table" cellpadding="0" cellspacing="0"
                                        width="99%">
                                        <thead>
                                            <tr>
                                                <th colspan="4">
                                                    Thông tin giỏ hàng
                                                </th>
                                            </tr>
                                        </thead>
                                        <tbody>
                                            <tr>
                                                <td colspan="2">
                                                    <asp:Panel ID="pnlViewCart" runat="Server">
                                                        <asp:UpdatePanel ID="pnlShoppingCart" runat="server">
                                                            <ContentTemplate>
                                                                <table border="0" cellpadding="0" cellspacing="0" style="">
                                                                    <table border="0" cellpadding="0" cellspacing="0" width="100%">
                                                                        <tr>
                                                                            <td id="tdShoppingCart" runat="server" class="" style="padding-left: 10px">
                                                                            </td>
                                                                        </tr>
                                                                        <caption>
                                                                            </td> </tr> Bạn có
                                                                            <asp:Label ID="lblNumber" runat="server" Font-Bold="true" ForeColor="#2088d8" Text="0 product" />
                                                                            &nbsp;trong giỏ hàng.
                                                                            <tr>
                                                                                <td colspan="1" rowspan="1" style="padding-top: 10px; padding-left: 0px;">
                                                                                    <asp:GridView ID="grdShoppingCart" runat="server" AutoGenerateColumns="False" CellPadding="10"
                                                                                        CssClass="grd" GridLines="None" OnRowDataBound="grdShoppingCart_RowDataBound">
                                                                                        <Columns>
                                                                                            <asp:TemplateField HeaderText="STT">
                                                                                                <ItemTemplate>
                                                                                                    <%# Container.DataItemIndex + 1 %>
                                                                                                </ItemTemplate>
                                                                                                <ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" />
                                                                                            </asp:TemplateField>
                                                                                            <asp:TemplateField HeaderText="Tên Chip">
                                                                                                <ItemTemplate>
                                                                                                    <%# Eval("Chip.ChipName")%>
                                                                                                </ItemTemplate>
                                                                                                <ItemStyle Font-Bold="true" HorizontalAlign="Center" Width="265px" Wrap="True" />
                                                                                            </asp:TemplateField>
                                                                                            <asp:TemplateField HeaderText="Giá">
                                                                                                <ItemTemplate>
                                                                                                    <asp:Label ID="lblPrice" runat="server" CssClass="clsPriceCart" Text='<%# Eval("Price") %>'></asp:Label>
                                                                                                    <asp:Label ID="lblMatchedPrice" runat="server" CssClass="clsPriceCartMatched" Text="0"></asp:Label>
                                                                                                </ItemTemplate>
                                                                                                <ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" Width="90" />
                                                                                            </asp:TemplateField>
                                                                                            <asp:TemplateField HeaderText="Số Lượng">
                                                                                                <ItemTemplate>
                                                                                                    <asp:UpdatePanel ID="updatePnlQuantity" runat="server">
                                                                                                        <ContentTemplate>
                                                                                                            <table border="0" cellpadding="0" cellspacing="0">
                                                                                                                <tr>
                                                                                                                    <td style="padding-top: 5px;">
                                                                                                                        <asp:TextBox ID="txtQuantity" runat="server" AutoPostBack="true" CssClass="txtQuantity"
                                                                                                                            OnTextChanged="txtQuantity_TextChanged" Text='<%# Eval("Quantity") %>' ToolTip="Cập nhật số lượng"
                                                                                                                            Width="30" />
                                                                                                                    </td>
                                                                                                                </tr>
                                                                                                            </table>
                                                                                                        </ContentTemplate>
                                                                                                        <Triggers>
                                                                                                            <asp:AsyncPostBackTrigger ControlID="txtQuantity" EventName="TextChanged" />
                                                                                                        </Triggers>
                                                                                                    </asp:UpdatePanel>
                                                                                                </ItemTemplate>
                                                                                                <ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" Width="90px" />
                                                                                            </asp:TemplateField>
                                                                                            <asp:TemplateField HeaderText="Thành tiền">
                                                                                                <ItemTemplate>
                                                                                                    <asp:UpdatePanel ID="updatePnlGrid" runat="server">
                                                                                                        <ContentTemplate>
                                                                                                            <asp:Label ID="lblSubTotal" runat="server" CssClass="clsSubTotalPriceCart"></asp:Label>
                                                                                                        </ContentTemplate>
                                                                                                    </asp:UpdatePanel>
                                                                                                </ItemTemplate>
                                                                                                <ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" Width="100" />
                                                                                            </asp:TemplateField>
                                                                                            <asp:TemplateField HeaderText="Xoá">
                                                                                                <ItemTemplate>
                                                                                                    <asp:ImageButton ID="imgDelete" runat="server" ImageUrl="~/images/del.gif" OnClick="imgDelete_Click"
                                                                                                        Style="display: block;" ToolTip="Xóa" />
                                                                                                </ItemTemplate>
                                                                                                <ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" Width="50" />
                                                                                            </asp:TemplateField>
                                                                                        </Columns>
                                                                                        <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                                                                                        <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
                                                                                        <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
                                                                                        <HeaderStyle CssClass="grdHeader" />
                                                                                        <EditRowStyle BackColor="#2461BF" />
                                                                                        <AlternatingRowStyle CssClass="grdAlternateRow" />
                                                                                        <RowStyle CssClass="grdRow" />
                                                                                    </asp:GridView>
                                                                                </td>
                                                                            </tr>
                                                                        </caption>
                                                                    </table>
                                                                    <asp:Panel ID="pnlCartFooter" runat="server" Width="100%" Style="margin: 5px auto 0">
                                                                        <table border="0" cellpadding="0" cellspacing="0" width="100%">
                                                                            <tr>
                                                                                <td style="text-align: right" id="thanh">
                                                                                    <asp:Label ID="test_tong" runat="server" CssClass="clsTotalPriceCart"></asp:Label>
                                                                                    <span class="clsTotalPriceCart">
                                                                                        <asp:Label ID="Label1" runat="server" CssClass="clsTotalPriceCart" Text="Tổng tiền:"
                                                                                            Visible="false"></asp:Label></span>
                                                                                    <asp:Label ID="lblTotal" runat="server" CssClass="clsTotalPriceCart" Visible="false"></asp:Label>
                                                                                    &nbsp;
                                                                                </td>
                                                                            </tr>
                                                                            <%--<tr>
                                                                                    <td style="padding: 10px 0 10px 0; text-align: right;" class="style1">
                                                                                        <asp:Button ID="imgBtnCheckOut" runat="server" Style="color: white; border-radius: 8px 0 8px 0;
                                                                                            padding: 6px; background: none repeat scroll 0px 0px rgb(198, 161, 69);" ToolTip="Check out"
                                                                                            Text="Checkout" />
                                                                                    </td>
                                                                                </tr>--%>
                                                                            <tr>
                                                                                <td style="padding: 10px 0 10px 0; text-align: right;">
                                                                                    <asp:Label ID="lblCheckOutInfo" runat="server" Text=""></asp:Label>
                                                                                </td>
                                                                            </tr>
                                                                        </table>
                                                                    </asp:Panel>
                                                            </ContentTemplate>
                                                        </asp:UpdatePanel>
                                                    </asp:Panel>
                                                </td>
                                            </tr>
                                        </tbody>
                                    </table>
                                </td>
                            </tr>
                            <tr>
                                <td align="left">
                                    <table width="700px" border="0">
                                        <tbody>
                                            <tr>
                                                <td width="400px">
                                                    <table id="ccDataArea" class="table payment-info-table" onclick="onCCPaymentMethodSelected();"
                                                        cellpadding="0" cellspacing="0">
                                                        <thead>
                                                            <tr>
                                                                <th colspan="3">
                                                                    Hình thức thanh toán
                                                                </th>
                                                            </tr>
                                                        </thead>
                                                        <tbody>
                                                            <tr valign="top">
                                                                <td width="120">
                                                                    <asp:RadioButton ID="rdtrasau" runat="server" Text="Trả sau" GroupName="thanhtoan"
                                                                        Checked="True" />
                                                                </td>
                                                                <td colspan="2" width="280">
                                                                    <asp:RadioButton ID="rdchuyenkhoan" runat="server" Text="ATM" GroupName="thanhtoan" />
                                                                </td>
                                                            </tr>
                                                        </tbody>
                                                    </table>
                                                </td>
                                                <td style="vertical-align: top" height="100%" width="200px">
                                                </td>
                                            </tr>
                                            <tr>
                                                <td colspan="2">
                                                    <input name="material" value="1" type="hidden">
                                                    <input name="on_country_change" value="false" type="hidden">
                                                    <table id="buyerInfoArea" class="table buyer-info-table" cellpadding="0" cellspacing="0"
                                                        width="100%">
                                                        <thead>
                                                            <tr>
                                                                <th colspan="4">
                                                                    Thông tin cá nhân
                                                                </th>
                                                            </tr>
                                                        </thead>
                                                        <tbody>
                                                            <tr valign="top">
                                                                <td width="75">
                                                                    Họ
                                                                </td>
                                                                <td width="225">
                                                                    <asp:TextBox ID="txtFName" runat="server" CssClass="inp"></asp:TextBox>
                                                                    <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ErrorMessage="*"
                                                                        ValidationGroup="buy" ControlToValidate="txtFName"></asp:RequiredFieldValidator>
                                                                </td>
                                                                <td>
                                                                    Tên
                                                                </td>
                                                                <td>
                                                                    <asp:TextBox ID="txtLName" runat="server" CssClass="inp"></asp:TextBox>
                                                                    <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" ErrorMessage="*"
                                                                        ValidationGroup="buy" ControlToValidate="txtLName"></asp:RequiredFieldValidator>
                                                                </td>
                                                            </tr>
                                                            <tr valign="top">
                                                                <td width="75" valign="middle">
                                                                    Địa chỉ
                                                                </td>
                                                                <td colspan="3">
                                                                    <asp:TextBox ID="txtaddress" runat="server" TextMode="MultiLine" Style="width: 92.5%;
                                                                        height: 20px;"></asp:TextBox>
                                                                    <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ErrorMessage="*"
                                                                        ValidationGroup="buy" ControlToValidate="txtaddress"></asp:RequiredFieldValidator>
                                                                </td>
                                                            </tr>
                                                            <tr valign="top">
                                                                <td>
                                                                    Công ty
                                                                </td>
                                                                <td>
                                                                    <asp:TextBox ID="txtcompany" runat="server" class="inp"></asp:TextBox>
                                                                </td>
                                                                <td>
                                                                    Điện thoại
                                                                </td>
                                                                <td>
                                                                    <asp:TextBox ID="txtmobilephone" runat="server" CssClass="inp"> </asp:TextBox>
                                                                    <asp:RequiredFieldValidator ID="RequiredFieldValidator4" runat="server" ErrorMessage="*"
                                                                        ValidationGroup="buy" ControlToValidate="txtmobilephone"></asp:RequiredFieldValidator>
                                                                </td>
                                                            </tr>
                                                            <tr valign="top">
                                                                <td>
                                                                    Email
                                                                </td>
                                                                <td>
                                                                    <asp:TextBoxWatermarkExtender ID="TextBoxWatermarkExtender1" runat="server" TargetControlID="txtemail"
                                                                        WatermarkCssClass="clsWaterMarkRequiredField" WatermarkText="email@user.com">
                                                                    </asp:TextBoxWatermarkExtender>
                                                                    <asp:TextBox ID="txtemail" runat="server" CssClass="inp" Width="80%"></asp:TextBox>
                                                                    <asp:RequiredFieldValidator ID="RequiredFieldValidator5" runat="server" ErrorMessage="*"
                                                                        ValidationGroup="buy" ControlToValidate="txtemail"></asp:RequiredFieldValidator>
                                                                    <asp:RegularExpressionValidator ID="RegularExpressionValidator2" runat="server" ErrorMessage="Invalid email address"
                                                                        Display="Static" ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*"
                                                                        ControlToValidate="txtemail" SetFocusOnError="True" ValidationGroup="buy"></asp:RegularExpressionValidator>
                                                                </td>
                                                                <td>
                                                                    Mật khẩu
                                                                </td>
                                                                <td>
                                                                    <asp:TextBox ID="txtPass" runat="server" TextMode="Password" CssClass="inp"></asp:TextBox>
                                                                    <asp:RequiredFieldValidator ID="RequiredFieldValidator6" runat="server" ErrorMessage="*"
                                                                        ValidationGroup="buy" ControlToValidate="txtPass"></asp:RequiredFieldValidator>
                                                                </td>
                                                            </tr>
                                                        </tbody>
                                                    </table>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td>
                                                    &nbsp;
                                                </td>
                                            </tr>
                                            <tr>
                                                <td colspan="2" align="center">
                                                </td>
                                            </tr>
                                            <tr>
                                                <td style="padding-top: 10px" align="left">
                                                </td>
                                                <td style="padding-top: 10px" align="right">
                                                    <table title="Click to Verify - This site chose VeriSign SSL for secure e-commerce and confidential communications."
                                                        cellpadding="2" cellspacing="0" width="135" border="0">
                                                        <tbody>
                                                            <tr>
                                                                <td valign="top" width="135" align="center">
                                                                    <asp:Button ID="btnBuy" runat="server" Style="height: 42px; width: 135px; background: url(images/btn_1.png) no-repeat;
                                                                        border: none;" Text="MUA NGAY" OnClick="btnBuy_Click" ValidationGroup="buy" />
                                                                </td>
                                                            </tr>
                                                        </tbody>
                                                    </table>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td>
                                                    &nbsp;
                                                </td>
                                            </tr>
                                        </tbody>
                                    </table>
                                </td>
                            </tr>
                        </tbody>
                    </table>
                    <br>
                </td>
                <td>
                    &nbsp;
                </td>
            </tr>
            <tr>
                <td>
                    &nbsp;
                </td>
                <td style="border-left: solid 1px #cecece; border-right: solid 1px #cecece;" valign="bottom"
                    width="680px" bgcolor="#FFFFFF">
                    <table class="bot bottom" cellpadding="2" cellspacing="6" width="100%">
                        <tbody>
                            <tr>
                                <td align="left">
                                    Poker Chips Việt Nam
                                </td>
                            </tr>
                        </tbody>
                    </table>
                </td>
                <td>
                    &nbsp;
                </td>
            </tr>
        </tbody>
    </table>
    </form>
</body>
</html>
